//
// Copyright (c) 2009 All Right Reserved
//
// vl
//
// 2009-01-01
// Contains ...
using System;
using System.Globalization;
namespace LargoPanels.Editor
{
/// A seed size.
public class SeedSize
{
#region Constants
///
/// The basic width
///
public const int BasicWidth = 100;
///
/// The basic height
///
public const int BasicHeight = 32;
///
/// The basic margin
///
public const int BasicMargin = 2;
///
/// The basic font size
///
public const int BasicFontSize = 12;
/// The text margin.
public const int TextMargin = 5;
#endregion
#region Constructors
/// Initializes static members of the SeedSize class.
static SeedSize() {
CurrentWidth = BasicWidth;
CurrentFontSize = BasicFontSize;
CurrentHeight = BasicHeight;
CultureInfo = new CultureInfo("en-US");
}
#endregion
#region Properties - Size
//// Cell after percent resize
/// Gets or sets the current width.
/// The width of the current.
public static int CurrentWidth { get; set; }
/// Gets or sets the size of the current font.
/// The size of the current font.
public static int CurrentFontSize { get; set; }
/// Gets or sets the current height.
/// The height of the current.
public static int CurrentHeight { get; set; }
///
/// Gets or sets the culture information.
///
///
/// The culture information.
///
public static CultureInfo CultureInfo { get; set; }
#endregion
///
/// The size changed as percent.
///
/// The given value.
public static void PercentSizeChanged(int givenValue) {
var q = givenValue / 100.0f;
SeedSize.CurrentWidth = (int)Math.Round(SeedSize.BasicWidth * q);
SeedSize.CurrentFontSize = (int)Math.Round(SeedSize.BasicFontSize * q);
SeedSize.CurrentHeight = (int)Math.Round(SeedSize.BasicHeight * q);
//// this.EditorSpace.RefreshMusterGrid();
}
}
}